package com.hyx.java.ctrl.admin;

import com.hyx.java.base.BaseResult;
import com.hyx.java.base.PageBean;
import com.hyx.java.dto.HyxTaskSearchReq;
import com.hyx.java.entity.HyxUser;
import com.hyx.java.service.HyxTaskService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/admin/task")
@CrossOrigin(origins = "*")
@Api(value = "任务管理",tags = "管理端接口")
public class HyxTaskCtrl {

    @Autowired
    private HyxTaskService taskService;
    @ApiOperation(value = "任务列表")
    @RequestMapping(value = "/page", method = RequestMethod.POST)
    public BaseResult<PageBean<HyxUser>> userPage(@RequestBody HyxTaskSearchReq search) {
        return BaseResult.success(taskService.userPage(search));
    }
}
